import java.util.Scanner;

public class Exer3_7_2 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入您的工资：");
        double salary = input.nextDouble();
        double tax=0;
        if(salary>15000){
            tax=(salary-15000)*0.15+(15000-8000)*0.1+(8000-3500)*0.05;
        }else if(salary>8000&&salary<=15000){
            tax=(salary-8000)*0.01+(8000-3500)*0.05;
        }else if(salary>3500&&salary<=8000){
            tax=(salary-3500)*0.05;
        }else{
            System.out.println("您不需要缴纳个人所得税");
        }
        System.out.println("您需要缴纳的个人所得税为："+tax+"元");
    }
}
